<template>
  <div>
    <div class="bg-white grid-content">
      <div style="overflow: hidden; ">
        <div class="mytitle"><svg-icon icon-class="rb" class="myIcon" /> 日报数据填报 </div>
        <div class="myButtons">
          <el-button >新增</el-button>
          <el-button >批量导入</el-button>
        </div>
      </div>
      <el-table :data="tableData" border style="width: 100%" :header-cell-style="{ background: '#F5F7FA', color: '#909399' }">
        <el-table-column prop="rq" label="日期">
        </el-table-column>

        <el-table-column fixed prop="dwmc" label="单位名称">
        </el-table-column>

        <el-table-column fixed="right" label="操作">
          <template slot-scope="scope">
            <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
            <el-button type="text" size="small">编辑</el-button>
          </template>
        </el-table-column>
      </el-table>

      <!-- 分页器 -->
      <el-pagination align='right' background @size-change="handleSizeChange" @current-change="handleCurrentChange"
        :current-page="pageNo" :page-sizes="[5, 10, 20, 30, 40, 50]" :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper" :total="total">
      </el-pagination>
    </div>
  </div>
</template>
  
<script>
export default {
  methods: {
    handleClick(row) {
      console.log(row);
    }
  },

  data() {
    return {
      tableData: [{
        rq: '2016-05-03',
        dwmc: '一队',
      }, {
        rq: '2016-05-02',
        dwmc: '二队',
      }, {
        rq: '2016-05-04',
        dwmc: '三队',
      }, {
        rq: '2016-05-01',
        dwmc: '四队',
      }]
    }
  }
}
</script>

<style lang="scss" scoped>
// 标题
.mytitle {
  font-size: large;
  padding-left: 10px;
  margin-bottom: 16px;
  float: left;
}

//按钮组
.myButtons {
  float: right
}

//格子的样式
.bg-white {
  background: #ffffff;
}
 
.grid-content {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.calendar ::v-deep .el-button-group::before {
  display: none;
}

.calendar ::v-deep .el-button-group::after {
  display: none;
}

// 分割线样式
.el-divider--horizontal {
  display: block;
  height: 2px;
  width: 100%;
  margin: 24px 0;
}

// 表单各项的样式
.el-form-item {
  margin: 15px 10px 15px 10px;
}

//表单禁用字体样式
.el-input.is-disabled ::v-deep .el-input__inner {
  color: #606266;
}

//对话框宽度
// .customWidth{
//         width:80%;
//     }
::v-deep .saveAsDialog {
  width: 60% !important;
}

::v-deep .el-table .cell{overflow: unset}

.el-date-editor.el-input,
.el-date-editor.el-input__inner {
  width: 180px;
}

.el-input {
  width: 180px;
}

.tagstyle{
  cursor: pointer;
}
</style>